package cn.hzc.fortess.system.service;

import cn.hzc.fortess.system.entity.Menu;
import cn.hzc.fortess.system.entity.Project;
import cn.hzc.fortess.system.node.MenuNode;
import cn.hzc.fortess.system.node.ZTreeNode;
import cn.hzc.fortess.system.page.Pagination;
import cn.hzc.fortess.system.search.MenuSearch;

import java.util.List;

public interface MenuService {

    List<MenuNode> getIndexMenuNodes(Project project,List<Integer> roleIds);

    void createRootMenu4Project(Project project);

    void add(Menu entity);

    void update(Menu entity);

    void delete(Integer id);

    void deleteByProject(Integer projectId);

    Menu getById(Integer id);

    Menu getByAuthIdent(String authIdent);

    Integer getResourceScopeById(Integer id);

    List<Menu> getMenuList(MenuSearch search);

    List<Menu> getDataMenuList(Integer projectId);

    Pagination getPage(MenuSearch search);

    List<ZTreeNode> menuTreeList(List<Integer> projectIds);

    List<Menu> getEnableAuthMenus(Integer projectId);

    List<Integer> getMenuIdListByRole(Integer roleId);

    List<MenuNode> getUserMenus(String projectCode,Integer userId);

}
